package chapter67;

import java.util.Scanner;

/*
 * 测试类：根据游客的不同年龄计算门票价格
 */
public class TestVisitor {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		Visitor vr1 = new Visitor();
		do {
			System.out.print("请输入姓名：");
			vr1.name = input.next();
			if (vr1.name.equals("n")) {
				break;
			}
			System.out.print("请输入年龄：");
			vr1.age = input.nextInt();
			vr1.showInfo();
		} while (true);
		System.out.println("程序结束");
	}

}
